.top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 1440px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(224, 230, 237, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  padding: 0 120px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* 子元素通用 */
.top > div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0 16px;
  box-sizing: border-box;
  border-radius: 12px;
  margin: 0 4px;
  transition: all 0.2s ease;
  font-weight: 500;
  color: #4a5568;
}

/* logo和标题样式 */
.top > .logo {
  flex: 0 0 auto;
  cursor: default;
  padding: 0 8px;
  margin-right: 8px;
}

.top > .logo img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(64, 158, 255, 0.2));
}

.top > .title {
  flex: 0 0 auto;
  margin-right: 40px;
  padding: 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  background: linear-gradient(135deg, #409eff 0%, #53c0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

.top > .title:hover {
  transform: scale(1.05);
}

/* 填充占满剩余空间 */
.top > .fill {
  flex-grow: 1;
  cursor: default;
  background: none;
}

/* 菜单项样式 */
.top > .home,
.top > .category,
.top > .borrowing,
.top > .collection {
  flex: 0 0 auto;
  min-width: 80px;
  font-size: 15px;
  position: relative;
}

.top > .personal {
  flex: 0 0 auto;
  margin-left: 20px;
}

/* 激活状态样式 */
.top > .active {
  background: linear-gradient(135deg, #409eff 0%, #53c0ff 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
  transform: translateY(-1px);
}

.top > .active::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: linear-gradient(135deg, #409eff 0%, #53c0ff 100%);
  border-radius: 2px;
}

/* hover样式 */
.top > div:hover:not(.logo):not(.fill):not(.personal):not(.title) {
  background: rgba(64, 158, 255, 0.1);
  color: #409eff;
  transform: translateY(-1px);
}

.top > div.active:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 1440px) {
  .top {
    min-width: 100%;
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .top {
    padding: 0 20px;
    height: 70px;
  }

  .top > .title {
    font-size: 18px;
    margin-right: 20px;
  }

  .top > .home,
  .top > .category,
  .top > .borrowing,
  .top > .collection {
    min-width: 60px;
    font-size: 14px;
  }
}
